package model;

/**
 * Store.java
 * Purpose: This class represent a store object
 * 
 * @author Hans Brems
 * @version 1.0 10/12/2011
 */

public class Store {
	/* The identifier of the store */
	private int storeID;
	/* The address of the store */
	private String address;
	/* The store's product inventory */
	private ProductInventory inventory;
	/* The name of the store */
	private String name;
	
	/** Constructs a new store */
	public Store() {
		this.inventory = new ProductInventory();
	}

	/** Constructs a new store */
	public Store(int storeID, String address, String name) {
		this.storeID = storeID;
		this.address = address;
		this.name = name;
		this.inventory = new ProductInventory();
	}
	
	/** Returns the identifier of the store */
	public int getStoreID() {
		return this.storeID;
	}

	/** Sets the identifier of the store */
	public void setStoreNumber(int storeNumber) {
		this.storeID = storeNumber;
	}

	/** Returns the address of the store */
	public String getAddress() {
		return this.address;
	}

	/** Sets the address of the store */
	public void setAddress(String address) {
		this.address = address;
	}
	
	/** Returns the name of the store */
	public String getStoreName() {
		return this.name;
	}
	
	/** Sets the name of the store */
	public void setStoreName(String storeName) {
		this.name = storeName;
	}
	
	/** Adds a product to the inventory */
	public void addProductToInventory(Product product) {
		this.inventory.addProduct(product);
	}
	
	/** Removes a product from the inventory */
	public void removeProductFromInventory(Product product) {
		this.inventory.removeProduct(product);
	}
	
	/** Returns a string representation of the inventory */
	public String printInventory() {
		return this.inventory.printProducts();
	}
}